//用户信息维护
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:news_flutter/widgets/custom/my_appbar_widget.dart';

class UserCenterInfoPage extends StatefulWidget {
  @override
  _UserCenterInfoPageState createState() => _UserCenterInfoPageState();
}

class _UserCenterInfoPageState extends State<UserCenterInfoPage> {
  @override
//  Widget build(BuildContext context) {
//    MediaQueryData mediaQuery = MediaQuery.of(context);
//    double bottomHeight = mediaQuery.padding.bottom;
//    return Scaffold(
//      appBar: AppBar(
//        title: Text("个人信息"),
//      ),
//      body: Stack(
//        children: <Widget>[
//          Positioned(
//            left: 0,right: 0,top: 0,bottom: 44 +bottomHeight,
//            child: SingleChildScrollView(
//              child: Column(
//                children: <Widget>[
//                  Container(
//                    height: 100,
//                    color: Colors.grey,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.brown,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.indigo,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.grey,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.brown,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.indigo,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.grey,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.brown,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.indigo,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.grey,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.brown,
//                  ),
//                  Container(
//                    height: 100,
//                    color: Colors.indigo,
//                  ),
//                ],
//              ),
//            ),
//          ),
//          Positioned(
//            left: 0,right: 0,bottom: 0,
//            child: Container(
//              height: 44 +bottomHeight,
//              alignment: Alignment.center,
//              child: Text("总计 ¥100.00"),
//              color: Colors.green.withOpacity(0.5),
//            ),
//          ),
//        ],
//      ),
//    );
//  }
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("调整运费"),
      ),
      body: Column(
        children: <Widget>[
          Expanded(
            child: ListView(
              children: <Widget>[
                _freight(),
                _huidan(),
                _freightPayTime(),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 30),
            child: Row(
              children: <Widget>[Text("data")],
            ),
          )
        ],
      ),
    );
  }

  ///填写运费信息
  Widget _freight() {
    return Container(
      decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          Row(
            children: <Widget>[
              Text(
                "预付油卡",
                style: TextStyle(color: Color(0XFF999999)),
              ),
              Expanded(
                child: TextField(),
              ),
            ],
          ),
          Divider(),
          Row(
            children: <Widget>[
              Text(
                "预付油卡",
                style: TextStyle(color: Color(0XFF999999)),
              ),
              //TextField()
            ],
          ),
          Divider(),
          Row(
            children: <Widget>[
              Text(
                "预付油卡",
                style: TextStyle(color: Color(0XFF999999)),
              ),
              //TextField()
            ],
          ),
        ],
      ),
    );
  }

  ///回单
  Widget _huidan() {
    return Row(
      children: <Widget>[
        Text("电子回单",style: TextStyle(color: Color(0XFF999999)),)
      ],
    );
  }

  ///运费时间
  Widget _freightPayTime() {
    return Text("data");
  }
}
